import request from '../utils/request.js';

//查询所有
export function findAll(data){
  return request({
    url:'/api/rbacManager/findAll/'+data.page+'/'+data.limit,
    method:'get',
  })
}

//新增用户
export function addOne(data){
  return request({
    url:'/api/rbacManager/addOne',
    method:'post',
    data
  })
}

//删除用户
export function deleteOne(data){
  return request({
    url:'/api/rbacManager/deleteOne?id='+data.id,
    method:'get',
  })
}

//更新用户
export function editOne(data){
  return request({
    url:'/api/rbacManager/updateRole',
    method:'post',
    data
  })
}

//更新用户状态
export function editOneType(data){
  return request({
    url:'/api/rbacManager/editType/'+data,
    method:'get',
  })
}

//修改用户默认密码123456  data 就是id  
export function userPwd(data){
  return request({
    url:'/api/rbacManager/initPwd/'+data,
    method:'get',
  })
}